﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using OBUCare.Core.Models;

namespace OBUCare.Web.Areas.Admin.Models
{
    public class DictTypeValueViewModel
    {
        [DisplayName("编号")]
        [ScaffoldColumn(false)]
        public int ID { get; set; }

        [DisplayName("父表")]
        [ScaffoldColumn(false)]
        public int DICT_TYPE_ID { get; set; }

         [DisplayName("标题")]
         [Required(ErrorMessage = "*请输入标题")]
        public string DICT_TITLE { get; set; }

         [DisplayName("排序")]
        public int DICT_INDEX { get; set; }

         [DisplayName("编码")]
         [ScaffoldColumn(false)]
        public string DICT_CODE { get; set; }

         [DisplayName("备注")]
        public string REMARK { get; set; }

        [DisplayName("状态")]
        [ScaffoldColumn(false)]
        public int STATUS { get; set; }

         [DisplayName("创建人")]
         [ScaffoldColumn(false)]
        public string CREATED_BY { get; set; }

         [DisplayName("创建时间")]
         [ScaffoldColumn(false)]
        public System.DateTime CREATED_DATE { get; set; }

         [DisplayName("修改人")]
         [ScaffoldColumn(false)]
        public string MODIFY_BY { get; set; }

         [DisplayName("修改时间")]
         [ScaffoldColumn(false)]
        public System.DateTime MODIFY_DATE { get; set; }

         public DictTypeValueViewModel()
         { }

        public DictTypeValueViewModel(DICT_TYPE_VALUE v)
        {           
            this.ID= v.ID;
            this.DICT_TYPE_ID =v.DICT_TYPE_ID;
            this.DICT_TITLE =v.DICT_TITLE;
            this.DICT_INDEX=v.DICT_INDEX ;
            this.DICT_CODE =v.DICT_CODE;
            this.REMARK=v.REMARK;
            this.STATUS =v.STATUS;
            this.CREATED_BY =v.CREATED_BY;
            this.CREATED_DATE=v.CREATED_DATE;
            this.MODIFY_BY =v.MODIFY_BY ;
            this.MODIFY_DATE =v.MODIFY_DATE ;
        }
    }
}